// 引入Vue
import Vue from 'vue'
import { createApp } from 'vue'
// 引入App
import App from './App.vue'
// import VueAxios from 'vue-axios';
import axios from 'axios'
Vue.prototype.$http= axios
import Vuex from 'vuex'
import store from './store'
// const app = createApp(App)

// 引入VueRouter插件
import VueRouter from 'vue-router'
import VueCookies from "vue-cookies";

// 完整引入
// import ElementUI from 'element-ui';
// import 'element-ui/lib/theme-chalk/index.css';
// import '../public/css/global.css'
// 引入路由器
import router from './router'

axios.defaults.baseURL='http://localhost:9090'
Vue.config.productionTip=false
// Vue.use(ElementUI);
//按需引入
import {Table, Pagination, TableColumn ,Button,Dialog,Image,Popover,Form,FormItem,Input,
Container,Main,Header, Tabs, TabPane, Breadcrumb,
 Card, Checkbox, BreadcrumbItem, Aside, Menu, Submenu, 
 MenuItemGroup, MenuItem, Row, Col, Dropdown, DropdownItem, DropdownMenu,Message, Descriptions, DescriptionsItem, Tree} from 'element-ui';

 Vue.prototype.$message = Message;

Vue.component('el-table', Table);
Vue.component('el-pagination', Pagination);
Vue.component('el-table-column', TableColumn);
Vue.component('el-dialog', Dialog);
Vue.component('el-button', Button);
Vue.component('el-image', Image);
Vue.component('el-popover', Popover);
Vue.component('el-form', Form);
Vue.component('el-form-item', FormItem);
Vue.component('el-input', Input);
Vue.component('el-container', Container);
Vue.component('el-header', Header);
Vue.component('el-main', Main);
Vue.component('el-tabs', Tabs);
Vue.component('el-tab-pane', TabPane);
Vue.component('el-breadcrumb', Breadcrumb);
Vue.component('el-breadcrumb-item', BreadcrumbItem);
Vue.component('el-card', Card);
Vue.component('el-checkbox', Checkbox);
Vue.component('el-aside', Aside);
Vue.component('el-menu', Menu);
Vue.component('el-submenu', Submenu);
Vue.component('el-menu-item-group', MenuItemGroup);
Vue.component('el-menu-item', MenuItem);
Vue.component('el-row', Row);
Vue.component('el-col', Col);
Vue.component('el-dropdown', Dropdown);
Vue.component('el-dropdown-item', DropdownItem);
Vue.component('el-dropdown-menu', DropdownMenu);
Vue.component('el-descriptions', Descriptions);
Vue.component('el-descriptions-item', DescriptionsItem);
Vue.component('el-tree', Tree);


Vue.use(Vuex)

// 应用插件
Vue.use(VueRouter)
Vue.use(VueCookies);
Vue.use(Message)
new Vue({
    el:'#app',
    render:h=>h(App),
    router:router,
    store,
    template:'<App/>'
})
